package com.meta.platform.login.plus.wechat.service;


import com.meta.platform.login.plus.common.vo.LoginSuccessVo;
import com.meta.platform.login.plus.wechat.http.resp.JsCode2SessionResponse;
import com.meta.platform.login.plus.wechat.rest.req.WeChatMinDecryptPhoneNumberCmd;
import com.meta.platform.login.plus.wechat.rest.req.WeichatAuthCmd;
import com.meta.platform.login.plus.wechat.rest.req.WeichatCodeLoginCmd;
import com.meta.platform.login.plus.wechat.rest.res.WechatUserInfoVo;

/**
 * 微信小程序业务处理
 *
 * @author pengjianfeng
 * @version 1.0
 * @date 2021/1/21 5:15 下午
 */
public interface WeChatMinProgramService {

    /**
     * 获取session key
     *
     * @param domainKey 域key
     * @param code 临时code
     * @return
     */
    JsCode2SessionResponse getSessionKey(WeichatAuthCmd cmd);

    /**
     * 解密手机号码，注册并登录
     *
     * @param domainKey 域key
     * @param decryptPhoneNumberCmd 密文消息
     */
    LoginSuccessVo registerAndLogin(WeChatMinDecryptPhoneNumberCmd decryptPhoneNumberCmd);

    WechatUserInfoVo getUserInfo(WeChatMinDecryptPhoneNumberCmd decryptPhoneNumberCmd);

    LoginSuccessVo codeLogin(WeichatCodeLoginCmd cmd);
}
